package org.magenta.pages;

import org.magenta.utils.configProperties;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;

public class Dashboard extends Page {

	public Dashboard(WebDriver driver) {
		super(driver);
		
	}
	
	@FindBy (className = "link-logout")
	public WebElement  logOut;
	
	
	public boolean isLoggedIn() {
		return isElementPresent(logOut);
    
	}

	@Override
	public void open() {	
		driver.get(configProperties.getProperty("url.be"));
	}

	public void logOut() {
		logOut.click();		
	}
}
